/****** Script to remove LSInsight objects that are no longer in use ******/

IF EXISTS (SELECT*
  FROM sysobjects
  WHERE Id=OBJECT_ID( N'[dbo].[factHotelStatistic]' )
		AND OBJECTPROPERTY( Id, N'IsProcedure' )=1)
BEGIN
DROP PROCEDURE [dbo].factHotelStatistic
END
;
GO
IF EXISTS (SELECT*
  FROM sysobjects
  WHERE Id=OBJECT_ID( N'[dbo].[dimextMergedHotelReservation]' )
		AND OBJECTPROPERTY( Id, N'IsProcedure' )=1)
BEGIN
DROP PROCEDURE [dbo].[dimextMergedHotelReservation]
END
;

GO
IF  EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[DW].[dHotelReservations]') AND type in (N'U'))
DROP TABLE [DW].[dHotelReservations]

GO 

IF  EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[DW].[fHotelStatistic]') AND type in (N'U'))
DROP TABLE [DW].[fHotelStatistic]

GO 

alter table dw.dHotelRooms drop column [Sharing Room];

GO